<template>
    <el-row>
        <el-row style="min-width:980px">
            <el-form  :model="search_form" :inline="true" class="search_prod demo-form-inline" label-width="120px">
                <el-form-item :label="item.title" style="" v-for="(item,i) in search_list" :key="i">
                    <el-input size="small" placeholder="" v-model="search_form[item.iden]"></el-input>
                </el-form-item>
            </el-form>
            <el-col :span="24" class="excel_btn">
                <el-button  :loading='$store.state.isLoading' size="mini"  type="primary" @click="subOrderInfo">查询</el-button>
            </el-col>
        </el-row>

    </el-row>
</template>

<script>
    export default {
        name: "excel_search",
        data(){
            return {
                search_form:{
                },
                search_list:[],
            }
        },
        created(){
            this.get_search_option();
        },
        methods:{
            get_search_option(){
                this.$api.getauto.get_search_title({}).then(res=>{
                    if (res.data.code == 200){
                        this.search_list = res.data.result ;
                        console.log(this.search_list)
                    }
                })
            },
            subOrderInfo(){
                this.$emit("search_change",this.search_form)
            }
        }
    }
</script>

<style scoped>
    .search_prod{
        float: left;
        width: 80%;
    }
    .el-form-item{
        float: left;
    }
    .excel_btn{
        text-align: left;
        padding: 20px 0 20px 70px ;
    }
</style>